package com.Stage;

import com.Stage.impl.Training;

import java.util.ArrayList;
import java.util.List;

public class GameStageManagement {
    //逻辑管理地图池
    private final List<mapStage> mapPools = new ArrayList<>();
    public GameStageManagement() {
        mapPools.add(new Training());
    }
    public mapStage getMapBySId(int id){
        for (mapStage mapStage : mapPools) {
            if (mapStage.getStageId() == id) {
                return mapStage;
            }
        }
        return null;
    }
    public mapStage getMapByName(String name){
        for (mapStage mapStage : mapPools) {
            if (mapStage.getStageName().equals(name)) {
                return mapStage;
            }
        }
        return null;
    }

    public List<mapStage> getMapStages() {
        return mapPools;
    }
}
